package com.xiaomaoguai.cxf.demo1;

import java.util.ArrayList;
import java.util.List;

import javax.jws.WebService;

/**
 * @Description :
 * @FileName: HelloServiceImpl.java
 * @Author :WeiHui.Zhang
 * @Data : 2015年8月17日 上午8:53:14
 * @Version:V1.00
 */
@WebService(endpointInterface = "com.xiaomaoguai.cxf.demo1.HelloService", serviceName = "HelloService", portName = "HelloServicePort")
public class HelloServiceImpl implements HelloService {

	@Override
	public String sayHello(String name) {
		return "hello , " + name;
	}

	@Override
	public String getUser(User user) {
		System.out.println("sayUser called...");
		return "User:[id=" + user.getId() + "][name=" + user.getName() + "]";
	}

	@Override
	public List<User> getListUser() {
		System.out.println("getListUser called...");
		List<User> lst = new ArrayList<User>();
		lst.add(new User(2, "u2"));
		lst.add(new User(3, "u3"));
		lst.add(new User(4, "u4"));
		lst.add(new User(5, "u5"));
		lst.add(new User(6, "u6"));
		return lst;
	}

}
